﻿using System;
using System.Windows.Media.Imaging;
using Oxage.Common;

namespace Oxage.Rasterizer.Models
{
	public partial class OutputFormat : ModelBase
	{
		#region Public properties
		public string Name
		{
			get
			{
				return this.name;
			}
			set
			{
				if (this.name != value)
				{
					this.name = value;
					OnPropertyChanged("Name");
				}
			}
		}
		private string name;

		public string Extension
		{
			get
			{
				return this.extension;
			}
			set
			{
				if (this.extension != value)
				{
					this.extension = value;
					OnPropertyChanged("Extension");
				}
			}
		}
		private string extension;

		public BitmapEncoder Encoder
		{
			get
			{
				return this.encoder;
			}
			set
			{
				if (this.encoder != value)
				{
					this.encoder = value;
					OnPropertyChanged("Encoder");
				}
			}
		}
		private BitmapEncoder encoder;
		#endregion

		#region Public methods
		public string GetDialogFilterName()
		{
			return string.Format("{0}|*{1}", this.Name, this.Extension);
		}

		public override string ToString()
		{
			return this.Name;
		}
		#endregion
	}
}
